﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MyAdmin/QuanLy.master" AutoEventWireup="true"
    CodeFile="KhachHang_AM.aspx.cs" Inherits="MyAdmin_KhachHang_AM" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <fieldset>
        <legend align="center"><b>Tìm Kiếm</b></legend>
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <tr>
                <td align="right">
                    Tên Đăng Nhập
                </td>
                <td align="left">
                    <asp:TextBox ID="txtTenDangNhap" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Tên KH
                </td>
                <td align="left">
                    <asp:TextBox ID="txtTen" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Email
                </td>
                <td align="left">
                    <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    Địa Chỉ
                </td>
                <td align="left">
                    <asp:TextBox ID="txtDiaChi" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td align="left">
                    <asp:Button ID="btnTimKiem_NCCGH" runat="server" Text="Tìm Kiếm" OnClick="btnTimKiem_NCCGH_Click" />
                </td>
            </tr>
        </table>
        <asp:Label ID="lblTBKhongTimThay" ForeColor="White" runat="server" Visible="false"
            Text="Không tìm thấy sản phẩm nào!"></asp:Label>
    </fieldset>
    <fieldset style="">
        <legend align="center"><b>Quản Lý Khách Hàng</b></legend>
         <table width=100%>
    <tr>
    <td align="center">
        <asp:DetailsView ID="dtChiTietGiangHang" runat="server"  Width="50%"
            BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
            CellPadding="3" HeaderText="Chi Tiết Khách Hàng" AutoGenerateRows="False" OnItemInserted="dtChiTietGiangHang_ItemInserted"
            OnItemUpdated="dtChiTietGiangHang_ItemUpdated" Style="margin-left: 0px" DataSourceID="LQDSNCC_GiangHang"
            DataKeyNames="ID" GridLines="Vertical">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <EditRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <Fields>
                <asp:BoundField HeaderText="ID" ReadOnly="true" DataField="ID" SortExpression="ID"
                    InsertVisible="False" />
                <asp:BoundField DataField="UserName" HeaderText="Tên ĐN" SortExpression="UserName" />
                <asp:BoundField DataField="FullName" HeaderText="Họ Tên" SortExpression="FullName" />
                <asp:BoundField DataField="Password" HeaderText="Password" SortExpression="Password"
                    Visible="false" />
                <asp:BoundField DataField="PersonalID" HeaderText="CMND" SortExpression="PersonalID" />
                <asp:BoundField DataField="Address" HeaderText="Địa Chỉ" SortExpression="Address" />
                <asp:BoundField DataField="SS" HeaderText="SS" SortExpression="SS" Visible="false" />
                <asp:BoundField DataField="IsDeleted" HeaderText="IsDeleted" SortExpression="IsDeleted"
                    Visible="false" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:BoundField DataField="NgayGiaNhap" HeaderText="Ngày Gia Nhập" SortExpression="NgayGiaNhap" />
                <asp:CheckBoxField DataField="DaXoa" HeaderText="Đã Xóa" SortExpression="DaXoa" />
                <asp:BoundField DataField="QuocGia" HeaderText="QuocGia" SortExpression="QuocGia"
                    Visible="false"></asp:BoundField>
                <asp:CheckBoxField DataField="IsBanned" HeaderText="Đã Khóa" SortExpression="IsBanned" />
                <asp:CommandField ShowEditButton="True" ShowInsertButton="True" CancelText="Hủy"
                    EditText="Cập Nhật" InsertText="Thêm" NewText="Thêm" UpdateText="Cập Nhật" />
            </Fields>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center" />
        </asp:DetailsView>
                     <asp:Label runat="server" Text="Label" ID="lblThongBaoDTView" ForeColor="White" Visible="false" />

          </td>
    </tr>
    </table>
        <br />
        <asp:GridView ID="gvDSNCC_GiangHang" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="ID" BackColor="White" BorderColor="#999999" BorderStyle="None"
            BorderWidth="1px" CellPadding="3" GridLines="Vertical" Width="100%" OnSelectedIndexChanged="gvDSNCC_GiangHang_SelectedIndexChanged"
            OnPageIndexChanging="gvDSNCC_GiangHang_PageIndexChanging">
            <AlternatingRowStyle BackColor="#DCDCDC" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" CancelText="Bỏ qua" DeleteText="Xóa" EditText="Sửa"
                    SelectText="Chọn" />
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                    SortExpression="ID" />
                <asp:BoundField DataField="UserName" HeaderText="Tên ĐN" SortExpression="UserName" />
                <asp:BoundField DataField="DaXoa" HeaderText="Đã Xóa" SortExpression="DaXoa" />
                <asp:TemplateField HeaderText="Chọn Khóa">
                    <ItemTemplate>
                        <asp:CheckBox ID="checkBanned" runat="server" Checked='<%# Eval("IsBanned") %>' AutoPostBack="True" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Chọn Xóa">
                    <ItemTemplate>
                        <asp:CheckBox ID="checkXoa" runat="server" AutoPostBack="True" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
            <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <RowStyle BackColor="#EEEEEE" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#0000A9" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#000065" />
        </asp:GridView>
        <asp:Button ID="XoaNhieuBUTTON" runat="server" Text="Xóa Đã Chọn" OnClick="XoaNhieuBUTTON_Click" />
        <asp:Button ID="BanDaChonBUTTON" runat="server" Text="Cập Nhật Khóa" OnClick="BanDaChonBUTTON_Click" />
        <asp:Label ID="lblThongBaoGridView" runat="server" ForeColor="White" Text="Label"></asp:Label>
        <br />
        <asp:LinqDataSource ID="LQDSNCC_GiangHang" runat="server" ContextTypeName="DataAccess_Layer.DataClasses_RetailerDataContext"
            EntityTypeName="" TableName="Customers" EnableInsert="True" EnableUpdate="True"
            OnSelecting="LQDSNCC_GiangHang_Selecting" OnUpdating="LQDSNCC_GiangHang_Updating"
            OnInserted="LQDSHoaDon_AM_Inserted">
        </asp:LinqDataSource>   
        <br />
    </fieldset>
</asp:Content>
